public class ThreadDemo5 {
    public static void main(String[] args) throws InterruptedException{
        Thread t = new Thread(() -> {
                try {
                    Thread.sleep(3000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }

        });
        t.start();
        t.join();
        System.out.println(t.getState());
    }
}
